Skip to content

fix(github-actions): consider previous path for renamed files - #3979

Merged
alan-agius4 merged 4 commits into
angular:mainfrom
canbolayir:fix/rename-path-classification
Sep 17, 2026
Merged

alan-agius4 merged 4 commits into
angular:mainfrom
canbolayir:fix/rename-path-classification

Conversation

@canbolayir

Copy link
Copy Markdown
Contributor

Fixes #3976.

GitHub exposes both filename and previous_filename for renamed pull request files. The Google-internal test classifier and pull-request path labeler currently inspect only filename, so moving a file out of a matched path can cause the source-side change to be missed.

This change:

checks both the destination and previous path for renamed files in google-internal-tests;
includes both paths in pull-request path-based labeling; and
adds regression coverage for a rename out of packages/core/primitives/** still receiving requires: TGP.

This follows the maintainer guidance in #3976 to recognize both sides of a rename for synced/sensitive paths.

@canbolayir canbolayir changed the title Fix/rename path classification fix(github-actions): consider previous path for renamed files Sep 16, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the GitHub Actions workflows to properly handle renamed files. Specifically, it ensures that both the current and previous filenames of renamed files are evaluated when checking if a change affects Google internal tests and when applying path-based labels to pull requests. A unit test has also been added to verify this behavior. As there are no review comments, I have no feedback to provide.

@alan-agius4 alan-agius4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Sep 17, 2026
@angular-robot
angular-robot Bot requested a review from alan-agius4 September 17, 2026 15:14
@angular-robot angular-robot Bot added the area: build & ci Related the build and CI infrastructure of the project label Sep 17, 2026
@canbolayir
canbolayir force-pushed the fix/rename-path-classification branch from e245e32 to 735a141 Compare September 17, 2026 15:19
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Sep 17, 2026

@alan-agius4 alan-agius4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@alan-agius4
alan-agius4 merged commit 99d5702 into angular:main Sep 17, 2026
17 checks passed
@alan-agius4

Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename handling can bypass Google internal tests and requires: TGP path gates

2 participants